package com.lyz.moil.core.security.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.lyz.moil.core.orm.hibernate.BaseEntity;

@Entity
@Table(name = "resources")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Resources extends BaseEntity {

	private Integer priority;
	private String url;
	private Integer type;
	private String memo;
	private String name;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "group_id")
	private ResourcesGroup group;

	private Integer gorder;
	private boolean isMenu = true;
	private String icon;

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ResourcesGroup getGroup() {
		return group;
	}

	public void setGroup(ResourcesGroup group) {
		this.group = group;
	}

	public boolean isMenu() {
		return isMenu;
	}

	public void setMenu(boolean isMenu) {
		this.isMenu = isMenu;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Integer getGorder() {
		return gorder;
	}

	public void setGorder(Integer gorder) {
		this.gorder = gorder;
	}

}
